<%= javascript_include_tag 'pagination' %>

<div class="portlet" style="width:100%;height:100%;">

  <div class="portlet-header">
    <table style="border:none;width: 100%; color: black; font-size: <%="#{@size_font_header}px"%>;">
      <tr style="vertical-align: middle">
        <td align="left">
          <% if @filters == 1 %>
            <b><%=t "filters_title"%></b>
          <% else %>
            <b><%=t "category_title"%></b>
          <% end %>
        </td>
      </tr>
    </table>
  </div>

  <div class="portlet-content">
    <div class="container">
      <% if @show_filters == 1 %>
      <table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr><td align="left" colspan="2">
              <%=link_to "&laquo; #{t('return_to_thematics')}" , :controller => "catalogs", :action => "index" %><br/>
          </td></tr>

          <% if @materials.total_entries > 0 %>
            <tr><td>
              <div id="filter_tree_authors" style="padding: 3px">
                <%= render :partial=>'catalogs/filters/tree_authors' , :layout=>false %>
              </div>
              <div id="filter_tree_countries" style="padding: 3px">
                <%= render :partial=>'catalogs/filters/tree_countries' , :layout=>false %>
              </div>
              <div id="filter_tree_editors" style="padding: 3px">
                <%= render :partial=>'catalogs/filters/tree_editors' , :layout=>false %>
              </div>
              <div id="filter_tree_years" style="padding: 3px">
                <%= render :partial=>'catalogs/filters/tree_years' , :layout=>false %>
              </div>
              <div id="filter_tree_thematics_filter" style="padding: 3px">
                <%= render :partial=>'catalogs/filters/tree_thematics_filter' , :layout=>false %>
              </div>
              <div id="filter_tree_editions" style="padding: 3px">
                <%= render :partial=>'catalogs/filters/tree_editions' , :layout=>false %>
              </div>
            </td></tr>
            
          <% end %>
        </table>

      <% else %>
        <div id="TreePanel" style="padding: 0">
          <ul id="list2">
            <% @categories.each do |category| %>
              <%=render :partial=>'catalogs/filters/tree_thematics', :locals => {:category => category} %>
            <% end %>
          </ul>
        </div>
        <br/>
        <br/>
        <div style="padding: 0">
          <table width="100%">
            <tr align="right">
              <td align="right"><%=link_to "#{t('go_to_filters')} &raquo;", :controller => "catalogs", :action => "go_to_filters" %></td>
            </tr>
          </table>
        </div>
      <% end %>
    </div>
  </div>
</div>


